package com.coldchain.cys.task;

import java.util.List;
import java.util.concurrent.TimeUnit;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.coldchain.cys.entity.Car;
import com.coldchain.cys.service.ICarService;

/**
 * 车辆刷新基本信息的定时器
 * @author Administrator
 *
 */
@Component
public class CarFlushInfoTask {

	@Autowired
	private ICarService carService ;
	
	/**
	 * 5分钟执行一次
	 */
	@Scheduled(fixedRate = 300000)
	public void task() {
		List<Car> data = carService.list(null);
		for (Car car : data) {
		//	boolean result = carService.doFlushCarInfo(car.getAdminPermit(), car.getDeviceNumber());
			//System.out.println(result);
		}
	}
}
